<?php
/**
 * Desc:
 * User: aniu
 * Date: 2020/12/27
 * Time: 上午11:11
 * @return
 */

namespace App\Http\Controller;

use App\Model\Entity\UserDd;
use Swoft\Db\DB;
use Swoft\Http\Message\Response;
use Swoft\Http\Server\Annotation\Mapping\Controller;
use Swoft\Http\Server\Annotation\Mapping\RequestMapping;
/**
 * Class BeanController
 *
 * @since 2.0
 *
 * @Controller(prefix="bean")
 */
class IndexController
{
    /**
     * @RequestMapping("index")
     *
     * @return string
     */
    public function index()
    {
        return 'test';
    }


    /**
     * @RequestMapping("test")
     * Desc:
     * User: aniu
     * Date: 2020/12/27
     * Time: 下午2:51
     */
    public function test(Response $response)
    {
        $list = DB::table('user_dd')->where(['uid'=>1])->get();
//        $list = UserDd::where(['uid'=>1])->get();
        return $list;
    }
}
